package com.djz.stuinfomge.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.djz.stuinfomge.dao.ICourseDAO;
import com.djz.stuinfomge.dao.IStudentDAO;
import com.djz.stuinfomge.entity.Course;
import com.djz.stuinfomge.entity.PageBean;
import com.djz.stuinfomge.entity.Student;
import com.djz.stuinfomge.exception.PageNumOutOfRange;
import com.djz.stuinfomge.service.CourseService;
import com.djz.stuinfomge.service.StudentService;

@Service
public class CourseServiceImpl extends BaseServiceImpl<Course> implements
		CourseService {

	public Course get(Course bean) {
		
		return getDAO().get(bean);
	}

	public PageBean<Course> getPage(Integer id, Integer size, Course bean)
			throws PageNumOutOfRange {

		return getDAO().getPage(id, size, bean);
	}

	public List getCourseByName(String name) {
		return null;
	}

	@Autowired
	public void setDAO(ICourseDAO dao) {
		this.dao = dao;
	}

	public ICourseDAO getDAO() {
		return (ICourseDAO) dao;
	}
}
